package com.bingxue.edu.management.system.model.query;

import com.bingxue.edu.common.enums.CommonStatusEnum;
import com.bingxue.edu.common.enums.EmployeeTypeEnum;
import com.bingxue.edu.framework.mybatis.query.Query;
import com.bingxue.edu.framework.mybatis.query.QueryType;
import com.bingxue.edu.management.system.model.entity.Employee;
import com.mybatisflex.annotation.TableRef;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 员工查询条件
 * @author panbo
 * @since 2024-07-03
 */
@Data
@Schema(description = "员工查询条件")
@TableRef(Employee.class)
public class EmployeeQuery {

    @Schema(description = "关键词")
    @Query(type = QueryType.LIKE, field = "name")
    @Query(type = QueryType.LIKE, field = "mobilePhone")
    private String keyword;

    @Schema(description = "组织")
    private String orgId;

    @Schema(description = "员工类型")
    private EmployeeTypeEnum type;

    @Schema(description = "员工状态")
    private CommonStatusEnum status;

    @Query(ignored = true)
    @Schema(description = "查询组织下所有组织成员")
    private boolean includeSingleOrg = true;
}
